<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/base.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>报表定制</title>

<script type="text/javascript">
   var tab = null;
   var accordion = null;
   var tree = null;
   $(function ()
   {

       //布局
       $("#layout1").ligerLayout({ leftWidth: 190, height: '100%',heightDiff:-20,space:4, onHeightChanged: f_heightChanged });

       var height = $(".l-layout-center").height();

       //Tab
       $("#framecenter").ligerTab({ height: height });

       //面板
       $("#accordion1").ligerAccordion({ height: height - 24, speed: null });

       $(".l-link").hover(function ()
       {
           $(this).addClass("l-link-over");
       }, function ()
       {
           $(this).removeClass("l-link-over");
       });
       /* //树
       $("#tree1").ligerTree({
           data : indexdata,
           checkbox: false,
           slide: false,
           nodeWidth: 120,
           attribute: ['nodename', 'url'],
           onSelect: function (node)
           {
               if (!node.data.url) return;
               var tabid = $(node.target).attr("tabid");
               if (!tabid)
               {
                   tabid = new Date().getTime();
                   $(node.target).attr("tabid", tabid)
               } 
               f_addTab(tabid, node.data.text, node.data.url);
           }
       }); */

       tab = $("#framecenter").ligerGetTabManager();
       accordion = $("#accordion1").ligerGetAccordionManager();
       tree = $("#tree1").ligerGetTreeManager();
       $("#pageloading").hide();

   });
   function f_heightChanged(options)
   {
       if (tab)
           tab.addHeight(options.diff);
       if (accordion && options.middleHeight - 24 > 0)
           accordion.setHeight(options.middleHeight - 24);
   }
   function f_addTab(tabid,text, url)
   { 
       tab.addTabItem({ tabid : tabid,text: text, url: url });
   } 
             
 var setting = {  
        data: {  
               simpleData: {  
                   enable: true,  
                   idKey: "id",  
                   pIdKey: "pId",  
                   rootPId: 1
               },
           },  
	    showLine : true,
        checkable : true,                  //每个节点上是否显示 CheckBox  
		isSimpleData : true,
		callback: {
			onClick: zTreeOnDblClick
		},
		view:{
			dblClickExpand: false,
			showLine:false//不显示连接线
		}
    };            
var treeNodes = [   
    {"id":11, "pId":0, "name":"报表版本维护",icon:"${ctx}/images/tree_icon/folder-open.png"},   
	{"id":22, "pId":0, "name":"报表定制",icon:"${ctx}/images/tree_icon/folder-open.png"},
	{"id":33, "pId":0, "name":"数据集管理",icon:"${ctx}/images/tree_icon/folder-open.png"},
	{"id":44, "pId":0, "name":"数据项管理",icon:"${ctx}/images/tree_icon/folder-open.png"},
	{"id":55, "pId":0, "name":"统计信息集管理",icon:"${ctx}/images/tree_icon/folder-open.png"},
	{"id":66, "pId":0, "name":"报表说明定制",icon:"${ctx}/images/tree_icon/folder-open.png"},
	/* {"id":223, "pId":22, "name":"数据校核",icon:"${ctx}/ui/images/tree_icon/leaf.png"},
	{"id":224, "pId":22, "name":"查看数据上报情况",icon:"${ctx}/ui/images/tree_icon/leaf.png"},
	{"id":225, "pId":22, "name":"校核式管理",icon:"${ctx}/ui/images/tree_icon/leaf.png"},
	{"id":226, "pId":22, "name":"集中式审核",icon:"${ctx}/ui/images/tree_icon/leaf.png"},
	{"id":227, "pId":22, "name":"简单查询",icon:"${ctx}/ui/images/tree_icon/leaf.png"},
	{"id":228, "pId":22, "name":"分类汇总",icon:"${ctx}/ui/images/tree_icon/leaf.png"}, */
];   
  var zTreeDemo = null;
$(document).ready(function(){//初始化ztree对象     
  zTreeDemo = $.fn.zTree.init($("#cityTree"),setting, treeNodes);  
});    
function zTreeOnDblClick(event, treeId, treeNode){

	zTreeDemo.expandNode(treeNode);
	if(treeNode.id == 11){
		f_addTab('a1',treeNode.name,'${ctx}/rptAnnualController/list');
	}
	if(treeNode.id == 22){
		f_addTab('a100',treeNode.name,'${ctx}/reportManageController/reportTreeList');
	}
	if(treeNode.id == 33){
		f_addTab('a101',treeNode.name,'${ctx}/set/list');
	}
	if(treeNode.id == 44){
		f_addTab('a102',treeNode.name,'${ctx}/dataItem/list');
	}
	if(treeNode.id == 55){
		f_addTab('a103',treeNode.name,'${ctx}/reportStatCategoryController/reportStatCategoryInfolist');
	}
	if(treeNode.id == 66){
		f_addTab('a104',treeNode.name,'${ctx}/reportTemplateExplainController/explainList');
	}
}
     </script> 
<style type="text/css"> 
    body,html{height:100%;}
    body{ padding:0px; margin:0;   overflow:hidden;}  
    .l-link{ display:block; height:26px; line-height:26px; padding-left:10px; text-decoration:underline; color:#333;}
    .l-link2{text-decoration:underline; color:white; margin-left:2px;margin-right:2px;}
    .l-layout-top{background:#102A49; color:White;}
    .l-layout-bottom{ background:#E5EDEF; text-align:center;}
    #pageloading{position:absolute; left:0px; top:0px; background:white url('images/loading.gif') no-repeat center; width:100%; height:100%;z-index:99999;}
    .l-link{ display:block; line-height:22px; height:22px; padding-left:16px;border:1px solid white; margin:4px;}
    .l-link-over{ background:#FFEEAC; border:1px solid #DB9F00;} 
    .l-winbar{ background:#2B5A76; height:30px; position:absolute; left:0px; bottom:0px; width:100%; z-index:99999;}
    .space{ color:#E7E7E7;}
    /* 顶部 */ 
    .l-topmenu{ margin:0; padding:0; height:0px; line-height:31px; background:url('lib/images/top.jpg') repeat-x bottom;  position:relative; border-top:1px solid #1D438B;  }
    .l-topmenu-logo{ color:#E7E7E7; padding-left:35px; line-height:26px;background:url('lib/images/topicon.gif') no-repeat 10px 5px;}
    .l-topmenu-welcome{  position:absolute; height:24px; line-height:24px;  right:30px; top:2px;color:#070A0C;}
    .l-topmenu-welcome a{ color:#E7E7E7; text-decoration:underline} 

 </style>
</head>
<body style="padding:0px;background:#3892d3;">  
<div id="pageloading"></div>  
<div id="Panel1_topPanel" class="f-panel f-panel-noheader f-noborder f-cmp topregion ui-widget f-layout-region-item f-region-top" style="display: block; width: 1366px; height: 60px; left: 0px; top: 0px;"><div class="f-panel-body" style="width: 1366px; height: auto;"><div id="Panel1_topPanel_Content">
          <div class="ui-widget-header_div f-mainheader" id="header">
              <table>
                  <tbody><tr>
                      <td>
                          <div class="f-inline-block" id="Panel1_topPanel_btnHomePage_wrapper"><a id="Panel1_topPanel_btnHomePage" class="f-btn f-btn-icon-only f-cmp icononlyaction ui-widget" data-qtip="官网首页" style="display: inline-block;"><span class="f-btn-inner"><i class="f-btn-icon ui-icon f-icon-home"></i><span class="f-btn-text">&nbsp;</span></span></a></div>
                           
							<a title="" href="#" class="logo"><img src="images/logo.png"></img>报表设计模块</a>
                       </td>
                       <td style="text-align: right;">
                          <!-- <div class="f-inline-block" id="Panel1_topPanel_btnDownloadPublic_wrapper"><a id="Panel1_topPanel_btnDownloadPublic" class="f-btn f-btn-icon-top f-cmp icontopaction ui-widget" style="display: inline-block;"><span class="f-btn-inner"><i class="f-btn-icon ui-icon f-icon-download"></i><span class="f-btn-text">首页</span></span></a></div>
                          <div class="f-inline-block" id="Panel1_topPanel_btnNextTheme_wrapper"><a id="Panel1_topPanel_btnNextTheme" class="f-btn f-btn-icon-top f-cmp icontopaction ui-widget" style="display: inline-block;"><span class="f-btn-inner"><i class="f-btn-icon ui-icon f-icon-magic"></i><span class="f-btn-text">注销</span></span></a></div>
                          <div class="f-inline-block" id="Panel1_topPanel_btnThemeSelect_wrapper"><a id="Panel1_topPanel_btnThemeSelect" class="f-btn f-btn-icon-top f-cmp icontopaction ui-widget" style="display: inline-block;"><span class="f-btn-inner"><i class="f-btn-icon ui-icon f-icon-bank"></i><span class="f-btn-text">修改密码</span></span></a></div> -->
                          <div class="f-inline-block" id="Panel1_topPanel_Button1_wrapper"><a id="Panel1_topPanel_Button1" class="f-btn f-btn-icon-left f-cmp userpicaction ui-widget" style="display: inline-block;"><span class="f-btn-inner"><img class="f-btn-icon" src="images/my_face_80.jpg"><span class="f-btn-text">当前用户</span></span><i class="arrowd ui-icon"></i></a></div>
                      </td>
                  </tr>
              </tbody></table>
          </div>
      </div></div></div>
  <div id="layout1" style="width:99.2%; margin:0 auto; margin-top:2px; "> 
        <div position="left"  title="菜单" id="accordion1"  style='OVERFLOW-Y: auto; OVERFLOW-X:hidden;'> 
				<ul id="cityTree" class="ztree"></ul>
        </div>
        <div position="center" id="framecenter"> 
            <div tabid="home" title="首页" style="height:300px" >
                <iframe frameborder="0" name="home" id="home" src=""></iframe>
            </div> 
        </div> 
        
    </div>
    <div style="display:none"></div>
</body>
</html>